--[[/**
/**
 * 减少能量
-- *
-- */]]

---@class BuffEffect242100 : BaseBuffEffect
BuffEffect242100 = ClientFight.CreateClass("BuffEffect242100", ClientFight.BaseBuffEffect)
local t = BuffEffect242100
t.BUFF_EFFECT_242100_ENERGY = "BUFF_EFFECT_242100_ENERGY";
---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local target = buff.target;

    local ratio = buff.buffBean.f_BuffEffectValue[1];
    local energy = (target.energy * toRatio(ratio));

    local skill = buff.skill;
    FighterManager.addEnergy(fight, target, skill.skillModelId, skill.frame, -energy, EnergyChangeReasonEnum.BUFF);
    skill.parameters[t.BUFF_EFFECT_242100_ENERGY] = energy;
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()